#include <stdio.h>
#include <unistd.h>
#include "ohos_init.h"
#include "los_tick.h"

void time_entry(){
    // 将1ms转为tick
    UINT32 tick = LOS_MS2Tick(1);
    printf("1ms = %dtick\n", tick);
    // 打印每个tick中包含多少cycle
    printf("Every tick has %d cycle\n", LOS_CyclePerTickGet());
    // 打印系统时钟
    printf("1s has %d cycle\n", 1000*tick*LOS_CyclePerTickGet());
}

SYS_RUN(time_entry);
